﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tracy.DataModel;
using Tracy.DataServices;

namespace Tracy.BasicServices
{
    public class ConfigurationManager
    {
        //#region Singleton
        ///// <summary>
        ///// Get the singleton instance
        ///// </summary>
        //public static ConfigurationManager Instance
        //{
        //    get { return SingletonHelper._instance; }
        //}

        ///// <summary>
        ///// Nested helper class
        ///// </summary>
        //private class SingletonHelper
        //{
        //    static SingletonHelper() { }
        //    internal static readonly ConfigurationManager _instance = new ConfigurationManager();
        //}
        //private ConfigurationManager()
        //{
        //    //Init codes come here
        //}
        //#endregion

        XmlSettingProvider<FanSubGroup> _fanSubGroupProvider = new XmlSettingProvider<FanSubGroup>(@"Settings\FanSubGroups.xml", "fan-sub-groups/fan-sub-group");

        public XmlSettingProvider<FanSubGroup> FanSubGroupProvider 
        {
            get { return _fanSubGroupProvider; }
        }

        XmlSettingProvider<Format> _formatProvider = new XmlSettingProvider<Format>(@"Settings\Formats.xml", "formats/format");

        public XmlSettingProvider<Format> FormatProvider
        {
            get { return _formatProvider; }
        }

        XmlSettingProvider<Resolution> _resolutionProvider = new XmlSettingProvider<Resolution>(@"Settings\Resolutions.xml", "resolutions/resolution");

        public XmlSettingProvider<Resolution> ResolutionProvider
        {
            get { return _resolutionProvider; }
        }

        XmlSettingProvider<FeedSource> _sourceProvider = new XmlSettingProvider<FeedSource>(@"Settings\Sources.xml", "sources/source");

        public XmlSettingProvider<FeedSource> FeedSourceProvider
        {
            get { return _sourceProvider; }
        }

        

        
        
    }
}
